<include file="Public/header"/>

<div class="x-nav">
      <span class="layui-breadcrumb">

      </span>
      <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
    </div>
    <div class="x-body">
      <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so" action="{:U('sendmember')}" method="get">        
          <input type="text" value="{:I('nickname')}" name="nickname"  placeholder="请输入用户昵称" autocomplete="off" class="layui-input">
          <input type="text" value="{:I('name')}" name="name"  placeholder="请输入用户真实姓名" autocomplete="off" class="layui-input">
          <input type="text" value="{:I('mobile')}" name="mobile"  placeholder="请输入用户手机号" autocomplete="off" class="layui-input">
          <button class="layui-btn"   type="submit" ><i class="layui-icon">&#xe615;</i></button>
          <button class="layui-btn"   type="reset" >清空</button>
        </form>
      </div>
      <xblock style="height:38px; line-height:38px;">
        <span class="x-right" style="line-height:38px">共有数据：{$count} 条</span>
      </xblock>
      <table class="layui-table">
        <thead>
          <tr>
            <th>
              <div class="layui-unselect header layui-form-checkbox" lay-skin="primary"><i class="layui-icon">&#xe605;</i></div>
            </th>
            <th>ID</th>
            <th>头像|昵称</th>
            <th>注册时间</th>
            <th>账号状态</th>
            <th>手机号</th>
            <th>真实姓名</th>
            <th>地址</th>
            <th>操作</th>
            </tr>
        </thead>
        <tbody>
        <volist name="list" id="vo">
          <tr>
            <td>
              <div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id={$vo['id']}><i class="layui-icon">&#xe605;</i></div>
            </td>
            <td>{$vo['id']}</td>
            <td><img src="{$vo['head']}" style="width: 40px">{$vo['nickname']}</td>
            <td>{$vo['addtime']|date="Y-m-d H:i:s",###}</td>
            <td><if condition='$vo["status"] eq 1'>正常<else/>冻结</if></td>
            <td>{$vo['mobile']}</td>
            <td>{$vo['name']}</td>
            <td>{$vo['address']}</td>
            <td class="td-manage">
              <a title="赠送优惠券" class="layui-btn layui-btn-xs"  onclick="x_admin_show('赠送优惠券','{:U('sendquan',array('id'=>$vo['id']))}')" href="javascript:;">
                赠送优惠券
              </a>
								                           
            </td>
          </tr>
        </volist>


        </tbody>
      </table>
      <div class="page" id="page">
        {$page}
      </div>

    </div>
    <script>


       /*用户-停用*/
      function member_stop(obj,id){
          layer.confirm('确认要停用吗？',function(index){

              if($(obj).attr('title')=='启用'){

                //发异步把用户状态进行更改
                $(obj).attr('title','停用')
                $(obj).find('i').html('&#xe62f;');

                $(obj).parents("tr").find(".td-status").find('span').addClass('layui-btn-disabled').html('已停用');
                layer.msg('已停用!',{icon: 5,time:1000});

              }else{
                $(obj).attr('title','启用')
                $(obj).find('i').html('&#xe601;');

                $(obj).parents("tr").find(".td-status").find('span').removeClass('layui-btn-disabled').html('已启用');
                layer.msg('已启用!',{icon: 5,time:1000});
              }
              
          });
      }


    </script>

<include file="Public/footer"/>

